package com.md.mod.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * ********************************
 *
 * @author zhaoqingwei.
 * 天下英雄出我辈，一入江湖岁月催.
 * 20192019/1/2916:23
 * ********************************
 * 描述：
 * <p>
 * 注释：
 **/
@Controller
@RequestMapping("/t")
public class TestController {

    @RequestMapping(value = "/ok",method = RequestMethod.POST)
    public String hello(){

        return "templates/ok";
    }

    @RequestMapping(value = "/p",method = RequestMethod.GET)
    public Object pageTest(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("index");
        return mav;
    }

    @RequestMapping(value = "/500",method = RequestMethod.GET)
    public Object page500(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/500");
        return mav;
    }

    @RequestMapping(value = "/403",method = RequestMethod.GET)
    public Object page403(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/403");
        return mav;
    }

    @RequestMapping(value = "/404",method = RequestMethod.GET)
    public Object page404(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/404");
        return mav;
    }

    @RequestMapping(value = "/setting",method = RequestMethod.GET)
    public Object pageSetting(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/setting");
        return mav;
    }

    @RequestMapping(value = "/app",method = RequestMethod.GET)
    public Object pageApp(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/app");
        return mav;
    }

    @RequestMapping(value = "/profile",method = RequestMethod.GET)
    public Object pageProfile(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/profile");
        return mav;
    }

    @RequestMapping(value = "/table",method = RequestMethod.GET)
    public Object pageTable(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/table/table");
        return mav;
    }
    @RequestMapping(value = "/table2",method = RequestMethod.GET)
    public Object pageTable2(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/table/table2");
        return mav;
    }
    @RequestMapping(value = "/table3",method = RequestMethod.GET)
    public Object pageTable3(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("demo/table/table3");
        return mav;
    }

    @RequestMapping(value = "/login",method = RequestMethod.GET)
    public Object pageLogin(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("login");
        return mav;
    }

    @RequestMapping(value = "/reg",method = RequestMethod.GET)
    public Object pageRegister(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("register");
        return mav;
    }
}
